<? // index.php


?>
<html >
<!-- html manifestxxx="offline.manifest" -->
<head>
<title>Chess Spider</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
<META HTTP-EQUIV="Pragma" CONTENT="no-cache" />
<style><? include 'css/chess-spider.css' ?></style>
<script language='javascript' src='scripts/constant.js' ></script>
<script language='javascript' src='scripts/factory.js?sadsasf' ></script>
<script language='javascript' src='scripts/message.js?asf' ></script>
<script language='javascript' src='scripts/event.js?dsfasdfa' ></script>
<script language='javascript' src='scripts/store.js' ></script>
<script language='javascript' src='scripts/util.js?af' ></script>
<script language='javascript' src='scripts/tasks.js?asdfa' ></script>
<script language='javascript' src='scripts/move.js' ></script>
<script language='javascript' src='scripts/regx.js' ></script>
<script language='javascript' src='scripts/game.js' ></script>
<script language='javascript' src='scripts/board.js?af' ></script>
<script language='javascript' src='scripts/fixedboard.js?adfadf' ></script>
<script language='javascript' src='scripts/movelist.js' ></script>
<script language='javascript' src='scripts/local.js?fasfq234' ></script>
<script language='javascript' src='scripts/weak.js' ></script>
<!--DEPRECATED <script language='javascript' src='scripts/popable.js' ></script>-->

<? // include 'khanty-script.txt' ?>

<script>
// control variables - - - - - - - - - - - - - - - - - - - -
//-chess_spider.params.pgn_url = "http://www.chess-spider.net/pgns/martin01.pgn";
//-chess_spider.params.pgn_url = "http://www.chessbase.com/news/2010/khanty/games/khanty01.pgn";
chess_spider.params.control.messaging = true;
chess_spider.params.fixedboards['fixedboard'] = { 'title': true, 'loadpgn': true, 'info': true, 'control': true, 'gamelist': true };
chess_spider.params.fixedboard_dflt =	'fixedboard';
chess_spider.params.movelists['movelist'] = { 'head': true, 'adjust': true };
chess_spider.params.movelist_dflt =	'movelist';
chess_spider.params.home_pnt_id =	'movelist';
chess_spider.state.user.login =		'<?=$_SESSION['login']?>';
chess_spider.state.user.name =		'<?=$_SESSION['name']?>';
</script>
<script>
	chess_spider.tasks.init();		// will occur automatically in the future when there is one js file
</script>
<style>
#cs__bg			{ position: absolute; top; 0; left: 0; width: 100%; height: 100%; z-index: -1;
			  background: -webkit-gradient( linear, 0% 0%, 100% 0%, from(#999), to(#999), color-stop(.3,#333)); }
#cs__logo		{ padding:0px; margin:0px; position: relative; top: 10px; 
			  -webkit-transition: -webkit-transform ease-in-out 500ms;  }
#cs__logo:hover		{ /* height: 80px; */ -webkit-transform: rotate(180deg) translate(0px,-5px); }

/* todo: make this fixed on top */
div#movelist		{}
*			{ -webkit-transition: opacity 0.2s ease-in-out; }
*[cs__disabled="true"]	{ opacity: 0.4; }
div#cs__popup		{ position: absolute; top: 50px; left: 50px; z-index: 999; background-color: #ddffaa;
			  font-size: 14px; font-family: sans-serif; text-align: center; padding: 6px;
			  box-shadow: 3px 2px 2px blue;  border: 2px solid darkblue; border-radius: 6px;
			  -webkit-transition: box-shadow 0.5s ease-in-out; 
			  -webkit-transition: background-color 0.5s ease-in-out; }
div#cs__popup:hover	{ box-shadow: 3px 2px 9px blue; background-color: #ccff99; }
div#cs__popup input	{ width: 30%; }
div#cs__popup button	{ width: 30%; }
div#cs__popup h4	{ color: darkred; font-family: serif; font-size; 18px; text-align: left; margin: 3px; }

div#home_hdr		{ margin: 10px 0px; padding: 0px; }
div#home_hdr a		{ display: inline-block; width: 24.5%; font-size: 18px; text-decoration: none; padding: 0px;
			  color: darkred; font-weight: bold; font-family: sans-serif; text-align: center;
			  text-shadow: 2px 2px 2px darkred;  border: 1px white solid; 
			  -webkit-transition: -webkit-transform ease-in-out 500ms; 
			  -webkit-transform: rotate(6deg); }
div#home_hdr a:hover	{ -webkit-transform: rotate(-6deg); color: darkred; text-decoration: none; }

div#home_body		{ -webkit-transform: rotate(180deg) scale(0.1);
			  -webkit-transition: -webkit-transform ease-in-out 500ms; }
div#home_body a		{ color: black; text-decoration: none; }
div#home_body a:visited	{ color: black; }
/*div#home_body a:hover	{ text-decoration: underline; } */
div#home_body a:disabled { color: red; }


div#home_body:disabled	{ background-color: gray; }
div.stt			{ display: -webkit-box; -webkit-box-orient: horizontal; margin: 3px; }
div.stt_nm		{ -webkit-box-flex: 1; background-color: yellow; min-width: 20ex; padding: 2px 6px 2px 3px; text-align: center; }
div.sits		{ -webkit-box-flex: 2; background-color: orange; padding: 2px 3px 2px 6px; }
div.stt_desc		{ font-style: italic; }
div.sit_nm		{ font-weight: bold; }
div.sit_desc		{ font-weight: normal; font-size: 70%; font-family: sans-serif; }

div.ctl			{ margin: 3px;
			  display: -webkit-box; -webkit-box-orient: horizontal; }
div.ctl_out		{ -webkit-box-flex: 1; padding: 0% 2%; }
div.ctl_in		{ border: red 1px solid; margin: 5px 0px; padding: 5px; border-radius: 8px; background-color: yellow; }
div.ctl_hdr		{ font-weight: bold; font-variant: small-caps; }
div.ctl_in ul		{ margin: 0px; padding: 0px 0px 0px 18px; }
div.ctl_in li		{ margin: 0px; padding:0px; font-size: 80%; font-family: sans-serif; }

</style>
</head>
<body >
<div id='cs__bg'></div>
<div id='leftside' ><div id='fixedboard'></div></div>
<table id='header'>
	<tr>
		<td class='cs__h1' ><img id='cs__logo' src='images/cs.png' />Chess Spider</td>
		<td style='width:90%;' ><table>
			<tr id='cs__login_tr' style='display:<?=(($_SESSION['usr_id'])?'none':'table-row')?>;' >
				<td>
					<a href='login' onclick='return chess_spider.local.loginStart()'>Login</a>
					&nbsp;
					<a href='home' onclick='return chess_spider.local.home()'>Home</a>
				</td>
				<td><a href='new-account' onclick='return chess_spider.local.loginEmail()'>Create New Account</a></td>
			</tr>
			<tr id='cs__logout_tr' style='display:<?=(($_SESSION['usr_id'])?'table-row':'none')?>;' >
				<td>
					<a href='login' onclick='return chess_spider.Message.logout()'>Logout</a>
					&nbsp;
					<a href='home' onclick='return chess_spider.local.home()'>Home</a>
				</td>
				<td><small>WELCOME</small> <?=$_SESSION['name']?></td>
			</tr>
			<tr id='cs__help_tr' >
				<td>
					<a target='_blank' href='http://code.google.com/p/chess-spider/wiki/UserGuide'>Help</a>
					&nbsp;
					<a target='_blank' href='http://code.google.com/p/chess-spider/issues/list'>Bugs</a>
					&nbsp;
					<a href='save' onclick='return chess_spider.tasks.save(this)' >Save</a>
					&nbsp;
					<a href='export' onclick='return chess_spider.tasks.export()' >Export</a>
				</td>
				</td>
				<td><a target='_blank' onclick="nonblockAlert(
						  'If problems, please create New Issue with contact info\n'
						+ 'Will be happy to help out\n'
						+ '(linked page is in next tab)')"
					href='http://code.google.com/p/chess-spider/wiki/TableOfContents'
					>Using Chess-Spider on your site</a>
				</td>
			</tr>
		</table></td>
	</tr>
	<tr id='cs__passwd_tr' style='display:none;' ><td colspan='2' >
		Login&nbsp;<input id='cs__login' >
		&nbsp;
		Password&nbsp;<input type='password' id='cs__cancel' >
		<br/>
		<button onclick='return chess_spider.local.loginSubmit()'>Login</button>
		&nbsp;
		<button onclick='return chess_spider.local.loginCancel()'>Cancel</button>
		&nbsp;
		<button onclick='return chess_spider.local.loginEmail()'>I Forgot</button>
	</td></tr>
	<tr id='cs__email_tr' style='display:none;' ><td colspan='2' >
		Email&nbsp;<input style='width:70%;' id='cs__email' >
		<br/>
		<button onclick='return chess_spider.local.loginStart()'>Login</button>
		&nbsp;
		<button onclick='return chess_spider.local.loginCancel()'>Cancel</button>
		&nbsp;
		<button onclick='return chess_spider.local.loginEmailSubmit()'>Send</button>
	</td></tr>
	</td></tr>
</table>
<div id='movelist' ></div>
</body>
</html>

